//
//  EPhotoWall.h
//  Common
//
//  Created by guoshiqing on 2018/6/1.
//  Copyright © 2018年 www.bitkinetic.com. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "EPhoto.h"

@protocol EPhotoWallDelegate <NSObject>
@optional
- (void)photoWallDelAction:(NSUInteger)index;
- (void)photoWallAddAction;
- (void)photoWallEnlargeAction:(NSUInteger)type fromIndex:(NSInteger)index;
- (void)photoWallMovePhotoFromIndex:(NSInteger)index toIndex:(NSInteger)newIndex;
@end


@interface EPhotoWall : UIView

@property (assign) id <EPhotoWallDelegate> delegate;

// 初始化设置图片
- (void)setPhotos:(NSArray*)photos resourceType:(RESOURCETYPE)type;
// 添加单张图片
- (void)addPhoto:(id)string  resourceType:(RESOURCETYPE)type;
// 添加多张图片
- (void)addPhotos:(NSArray *)photos  resourceType:(RESOURCETYPE)type;
// 删除图片
- (void)deletePhotoByIndex:(NSUInteger)index;
// 删除图片，只保留加号按钮
- (void)deletePhotoExceptAddBtn;
// 设置是否显示加号
- (void)setEditModel:(BOOL)canEdit;


- (NSMutableArray *)getPhotos;

- (id)getPhotoFileByIndex:(NSInteger)index;

- (id)initWithFrame:(CGRect)frame withRow:(NSUInteger)row withMaxNumber:(NSUInteger)maxNum;

- (CGFloat)heightOfPhotoWall;

//- (void)addCRMFiles:(NSArray *)files resourceType:(RESOURCETYPE)type;

@end
